package com.neusoft.elm.dao;

import java.util.List;
import com.neusoft.elm.po.Business;

public interface BusinessDao {
    
    /**
     * 查询所有商家
     */
    public List<Business> listBusiness() throws Exception;
    
    /**
     * 根据商家ID查询商家信息
     */
    public Business getBusinessById(Integer businessId) throws Exception;
    
    /**
     * 根据排序类型查询商家列表
     * @param sortType 排序类型：distance(距离)、sales(销量)、rating(评分)
     */
    public List<Business> listBusinessBySort(String sortType) throws Exception;
    
    /**
     * 商家登录验证
     */
    public Business getBusinessByIdByPass(Integer businessId, String password) throws Exception;
    
    /**
     * 保存商家信息（注册）
     */
    public int saveBusiness(Business business) throws Exception;
}